﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Resources;
using System.Reflection;

namespace Cash_n_guns
{
    public partial class PlayerControl : UserControl
    {
        public int ClickLeft { get; set; }
        public int BangLeft { get; set; }
        public int BangBangBangLeft { get; set; }
        public Boolean IsMyCharacter { get; set; }

        public PlayerControl()
        {
            InitializeComponent();
            ClickLeft = 5;
            BangBangBangLeft = 1;
            BangLeft = 2;

            m_lblClickLeft.Text = ClickLeft.ToString();
            m_lblBangLeft.Text = BangLeft.ToString();
            m_lblBangBangBangLeft.Text = BangBangBangLeft.ToString();
            
        }

        public PlayerControl(string _strPlayerName)
        {
            InitializeComponent();
            m_grbPlayer.Text = _strPlayerName;
            ClickLeft = 5;
            BangBangBangLeft = 1;
            BangLeft = 2;

            m_lblClickLeft.Text = ClickLeft.ToString();
            m_lblBangLeft.Text = BangLeft.ToString();
            m_lblBangBangBangLeft.Text = BangBangBangLeft.ToString();
        }

        private void m_pbxCharacter_Click(object sender, EventArgs e)
        {
            //if ( IsMyCharacter == true)
            //{
            m_pbxCharacter.Image = (Bitmap)MainWindow.rm.GetObject("ShameCharacter");  
            //}
        }

        private void m_btnClick_Click(object sender, EventArgs e)
        {
            if (ClickLeft <= 1)
            {
                m_btnClick.Enabled = false;
                ClickLeft--;
                m_lblClickLeft.Text = ClickLeft.ToString();
            }
            else
            {
                ClickLeft--;
                m_lblClickLeft.Text = ClickLeft.ToString();
                
            }
        }

        private void m_btnBang_Click(object sender, EventArgs e)
        {
            if (BangLeft <= 1)
            {
                m_btnBang.Enabled = false;
                BangLeft--;
                m_lblBangLeft.Text = BangLeft.ToString();
            }
            else
            {
                BangLeft--;
                m_lblBangLeft.Text = BangLeft.ToString();
            }
        }

        private void m_btnBangBangBang_Click(object sender, EventArgs e)
        {
            if (BangBangBangLeft <= 1)
            {
                m_btnBangBangBang.Enabled = false;
                BangBangBangLeft--;
                m_lblBangBangBangLeft.Text = BangBangBangLeft.ToString();
            }
            else
            {
                BangBangBangLeft--;
                m_lblBangBangBangLeft.Text = BangBangBangLeft.ToString();
            }
        }

        private void PlayerControl_Load(object sender, EventArgs e)
        {

        }

    }
}
